<!--<link href="/mix/bootstrap-theme.min.css" rel="stylesheet">-->
<script src="/mix/jquery.min.js"></script>
<link href="/mix/layer.css" rel="stylesheet">
<script src="/mix/layer.js"></script>

<!--<link href="/assets/stylesheets/bootstrap.min.css" rel="stylesheet" />-->
<link href="/assets/stylesheets/plugins/uploadify/uploadify.min.css" rel="stylesheet" />
<link href="/assets/stylesheets/plugins/chosen/chosen.min.css" rel="stylesheet" />
<button class="{$config['class']} select_img_{$temp_id}" type="button"  {$config['data_str']}>选择图片</button>

<script>

    $('.select_img_{$temp_id}').on('click',function  () {
        var targetId=this.getAttribute('data-target');
        layer.open({
            title:'图片库',
            type: 2,
            shadeClose:true,
            area: ['700px', '450px'],
            fixed: false, //不固定
            maxmin: false,
            content: '{addonsUrl("img_library")}?type=vshop_img&target='+targetId+'{$config["config_str"]}'
        });
    })
    var  fun_name='{$config["callback"]}';
    window.uploadImgCallback=function (tgt,url){
        if(fun_name){
            eval(fun_name+'(tgt,url)')
        }

    }

</script>